Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] Add interpolation parameter to resize_to_po2() #44460

Merged
merged 1 commit into from
Dec 19, 2020

Conversation

theoratkin
Copy link
Contributor

@theoratkin theoratkin commented Dec 17, 2020

Add an optional p_interpolation parameter to Image::resize_to_po2() and call it in GLES2 rasterizer storage with either INTERPOLATE_BILINEAR or INTERPOLATE_NEAREST depending on TEXTURE_FLAG_FILTER.

This is equivalent of #44445 that closes #44379 in 3.2.

@YeldhamDev
Copy link
Member

I'm sure the commits that add the function and the doc update respectively could be unified.

And thanks for your first contribution to Godot!

@theoratkin
Copy link
Contributor Author

@YeldhamDev Done! And it's my pleasure. 😃

drivers/gles2/rasterizer_storage_gles2.cpp Outdated Show resolved Hide resolved
@clayjohn
Copy link
Member

Should be good to go once you squash the commits together. For simple changes like this we prefer one commit.

Image::resize_to_po2() now takes an optional p_interpolation parameter
that it passes directly to resize() with default value INTERPOLATE_BILINEAR.

GLES2: call resize_to_po2() with interpolate argument

Call resize_to_po2() in GLES2 rasterizer storage with either
INTERPOLATE_BILINEAR or INTERPOLATE_NEAREST depending on TEXTURE_FLAG_FILTER.

This avoids filtering issues with non power of two pixel art textures.
See godotengine#44379
@theoratkin
Copy link
Contributor Author

@clayjohn Squashed.

@akien-mga akien-mga merged commit a4d25a1 into godotengine:3.2 Dec 19, 2020
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants